<?php
$buzzr_cities = get_buzzr_cities();

$list_view_deal = new Pod('deal');
$where = "t.camp_end > ".fix_date()." && t.sale=1";
$list_view_deal->findRecords("id DESC", 15, $where);
?>
<h1 id="f_margin">Local Offers in India</h1>

<?php buzzr_fb_like(); ?>
<div class="clear"></div>
<div class="filter">
 <div class="city_select">Select City
	 <select name="city_select" onchange="window.location.href = this.value;">
	 	<option value="#">-- Choose City --</option>
	 	<?php foreach($buzzr_cities as $city_val){
           $citlink = BUZZR_URL.'/localoffers/'.strtolower($city_val['name']);
        ?>
	 	<option value="<?php echo $citlink; ?>"><?php echo $city_val['name']; ?></option>
	 	<?php } ?>
	 </select>
  </div>
  <div class=views>
	<a class="grid g-button">Map View</a>
	<a class="list g-button">List View</a>
  </div>
  
  <div class="sort">Sort by
	<a class="g-button" href="<?php echo BUZZR_URL.'/deals'; ?>">Latest</a>
	<a class="g-button" href="<?php echo BUZZR_URL.'/deals-popular'; ?>">Popular</a>
  </div>
  <div class="clear"></div>
</div>

<div id="list_wrap">
<ul class="list">
	<?php echo $list_view_deal->showTemplate('list_grid'); ?>
</ul>
</div>
<div class="clear"></div>
	
<div>
	<?php echo $list_view_deal->getPagination(); ?>
</div>

<div id="map_wrap">

<div id="deals_map">
  <div id="deals_map_wrap"></div>
</div>
<div id="map_canvas"></div>
<div id="details"></div>
<div id="spinner"><img src="<?php echo BUZZR_THEME_URL.'/img/buzzr_spinner.gif'; ?>" /></div>
<div id="tags-control" class="gradient">
<label for="tags">Filter Category</label>
<select id="tags">

</select>          
</div>
<div id="search" class="gradient">
   <label for="address">Search</label>
   <input type="text" id="address" value="(Area, City) or (City)" />
   <input type="button" id="address_go" value="Go" />
</div>

</div>
<div class="clear"></div>